import tornado.netutil
import tornado.process

from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop

from web.app import application

if __name__ == "__main__":
	sockets = tornado.netutil.bind_sockets(8888)
	tornado.process.fork_processes(0)
	server = HTTPServer(application)
	server.add_sockets(sockets)
	IOLoop.current().start()
